import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [{
	path: '/',
	name: 'home',
	component: HomeView,

	children: [
		//  数据大盘
		{
			path: "sjdp/hydp",
			name: "hydp",
			component: () => import("../views/sjdp/HydpView.vue")
		},
		{
			path: "sjdp/pfdp",
			name: "pfdp",
			component: () => import("../views/sjdp/PfdpView.vue")
		},

		{
			path: "sjdp/ppdp",
			name: "ppdp",
			component: () => import("../views/sjdp/PpdpView.vue")
		},

		// 票房分析
		{
			path: "pffx/pfb",
			name: "pfb",
			component: () => import("../views/pffx/PfbView.vue")
		},

		{
			path: "pffx/yppf",
			name: "yppf",
			component: () => import("../views/pffx/YppfView.vue")
		},

		{
			path: "pffx/yypf",
			name: "yypf",
			component: () => import("../views/pffx/YypfView.vue")
		},
		{
			path: "pffx/sspf",
			name: "sspf",
			component: () => import("../views/pffx/SspfView.vue")
		},
		{
			path: "pffx/hwpf",
			name: "hwpf",
			component: () => import("../views/pffx/HwpfView.vue")
		},

		// // 排片分析
		{
			path: "ppfx/yppp",
			name: "yppp",
			component: () => import("../views/ppfx/YpppView.vue")
		},
		{
			path: "ppfx/yypp",
			name: "yypp",
			component: () => import("../views/pffx/YypfView.vue")
		},
		{
			path: "ppfx/sspp",
			name: "sspp",
			component: () => import("../views/pffx/SspfView.vue")
		},
		// // 宣发舆情
		{
			path: "xfyq/rszs",
			name: "rszs",
			component: () => import("../views/author/AuthorSortView.vue")
		},
		{
			path: "xfyq/gpzs",
			name: "gpzs",
			component: () => import("../views/author/GpzsView.vue")
		},
		{
			path: "xfyq/kbzs",
			name: "kbzs",
			component: () => import("../views/author/KbzsView.vue")
		},
		// // 情报
		{
			path: "qb/tzqb",
			name: "tzqb",
			component: () => import("../views/qb/TzqbView.vue")
		},
		{
			path: "qb/fhqb",
			name: "fhqb",
			component: () => import("../views/qb/FhqbView.vue")
		},
		{
			path: "qb/yyqb",
			name: "yyqb",
			component: () => import("../views/qb/YyqbView.vue")
		},
		{
			path: "qb/zrgg",
			name: "zrgg",
			component: () => import("../views/qb/ZrggView.vue")
		},
		{
			path: "qb/hyfx",
			name: "hyfx",
			component: () => import("../views/qb/HyfxView.vue")
		},
		// // 个人中心
		{
			path: "grzx/grzx",
			name: "grzx",
			component: () => import("../views/grzx/GrzxView.vue"),
			children: [{
					path: "usermsg",
					name: "usermsg",
					component: () => import("../views/grzx/user/UserMsgView.vue")
				},
				{
					path: "idmanage",
					name: "idmanage",
					component: () => import("../views/grzx/user/IdManageView.vue")
				}, {
					path: "invocemanage",
					name: "invocemanage",
					component: () => import("../views/grzx/user/InvoceManageView.vue")
				},
				{
					path: "myorder",
					name: "myorder",
					component: () => import("../views/grzx/user/MyOrderView.vue")
				},
				{
					path: "myorder/:orderNum",
					name: "myorder",
					component: () => import("../views/grzx/user/DetailOrderView.vue"),
					meta:{
						noHeader:true
					}
				}
			],
			redirect: "/grzx/grzx/idmanage"

		},
		//购买续费
		{
			path: "gmxf/gmxf",
			name: "gmxf",
			component: () => import("../views/gmxf/GmxfView.vue")
		},
		// search
		{
			path: "DataMarket/Search",
			name: "Search",
			component: () => import("../views/search/SearchView.vue")
		},
	]
}]

const router = new VueRouter({
	routes
})

export default router